//
//  ProfileButton.m
//  LoveFreshBeen
//
//  Created by vinsent on 16/10/15.
//  Copyright © 2016年 魏根. All rights reserved.
//

#import "ProfileButton.h"

@implementation ProfileButton

- (instancetype)init {
    if (self = [super init]) {
        self.titleLabel.font = [UIFont systemFontOfSize:14];
        self.imageView.contentMode = UIViewContentModeCenter;
        self.titleLabel.contentMode = UIViewContentModeCenter;  
    }
    return self;
}
-(void)layoutSubviews {
    [super layoutSubviews];
    [self.titleLabel sizeToFit];
    self.imageView.frame = CGRectMake(0, 0, self.imageView.image.size.width, self.imageView.image.size.height);
    self.titleLabel.frame = CGRectMake(0, self.bounds.size.height - self.imageView.bounds.size.height, self.titleLabel.bounds.size.width, self.titleLabel.bounds.size.height);
    self.imageView.center = CGPointMake(self.bounds.size.width / 2, self.center.y - 12);
    self.titleLabel.center = CGPointMake(self.bounds.size.width / 2, self.center.y + 15);
}


@end
